# Model Building
This directory contains the code to train all models used in our analyses. `01_primary_models` and `02_oos_models` follow a nearly identical structure. In `01_primary_models`, we are fitting the model on a training set which we will analyze on a separate holdout set; this model is used in the main analyses in the paper (Sections 4.1-4.3, Section 5). In `02_oos_models`, we split the train data into 5 folds and for each fold, train a model on the other 4 folds. This way, we also have out-of-sample algorithm predictions on our train set, which we will use for a few analyses that require a larger sample than our test set (Section 4.4). `03_cardiology_models` assesses physician testing and test results, as a function of cardiologist-reported features of the ECG, for patients who have an ECG during their visit (Appendix 5.1).
